package com.yunhe.abnormal.service.data;

import com.yunhe.abnormal.domain.data.AbnormalEventRecord;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.model.PageParam;

import java.util.List;
import java.util.Optional;

public interface AbnormalEventRecordService {

    AbnormalEventRecord create(AbnormalEventRecord abnormalEventRecord) throws ObjectNotFoundException;

    Iterable<AbnormalEventRecord> create(List<AbnormalEventRecord> abnormalEventRecords) throws ObjectNotFoundException;

    void delete(Long id);

    AbnormalEventRecord update(AbnormalEventRecord abnormalEventRecord) throws ObjectNotFoundException;

    AbnormalEventRecord update(Long id,
                               Optional<String> dtime,
                               Optional<Long> userIdProcess,
                               Optional<String> records) throws ObjectNotFoundException;

    AbnormalEventRecord findById(Long id);

    Iterable<AbnormalEventRecord> retrieve(Optional<Long> userId,
                                           Optional<Long> eventId,
                                           Optional<String> dtime,
                                           Optional<String> queryStr,
                                           PageParam pageParam);

    AbnormalEventRecord findByAbnormalEventId(Long eventId);
}
